<template>
  <div class="p-15px">
    Notification通知<br /><br />
    <el-button plain @click="infoButton">默认通知</el-button>
    <el-button type="warning" plain @click="warningButton">警告通知</el-button>
    <el-button type="success" plain @click="successButton">成功通知</el-button>
    <el-button type="danger" plain @click="errorButton">错误通知</el-button>
    <el-button type="primary" plain @click="anyButton">任意通知</el-button>
  </div>
</template>

<script setup lang="ts">
import {
  koiNotice,
  koiNoticeInfo,
  koiNoticeWarning,
  koiNoticeSuccess,
  koiNoticeError,
} from "@/utils/koi.ts";

const infoButton = () => {
  koiNoticeInfo("默认通知", 2000);
};

const warningButton = () => {
  koiNoticeWarning("警告通知", 2000);
};

const successButton = () => {
  koiNoticeSuccess("成功通知", 2000);
};

const errorButton = () => {
  koiNoticeError("错误通知", 5000);
};

const anyButton = () => {
  koiNotice("任意通知", 2000, "success");
};
</script>

<style scoped></style>
